#ifndef _TIMERS_H_
#define _TIMERS_H_

#include "sensors.h"

#define 	NUMTMR1MS	8
extern volatile unsigned int 	Timer1ms[NUMTMR1MS];

#define 	NUMTMR10MS	24
extern volatile unsigned int 	Timer10ms[NUMTMR10MS];
#define		Tmr10msEntreTx		Timer10ms[1]
#define		Tmr10msProcesso		Timer10ms[2]
#define		Tmr10msC3L1			Timer10ms[3]
#define		Tmr10msC1L2			Timer10ms[4]
#define		Tmr10msC2L2			Timer10ms[5]
#define		Tmr10msC3L2			Timer10ms[6]
#define		Tmr10msC1L3			Timer10ms[7]
#define		Tmr10msC2L3			Timer10ms[8]
#define		Tmr10msC3L3			Timer10ms[9]
#define		Tmr10msLed1			Timer10ms[10]
#define		Tmr10msBot11		Timer10ms[11]
#define		Tmr10msBot10		Timer10ms[12]
#define		Tmr10msDelay		Timer10ms[13]
#define		Tmr10msRecFrame		Timer10ms[14]
#define		Tmr10msTxFrame		Timer10ms[15]
#define		Tmr10msRxByte		Timer10ms[16]
#define		Tmr10msI2C   		Timer10ms[17]
#define		Tmr10msTx			Timer10ms[18]
#define		TmrEstTecla			Timer10ms[19]
#define		Tmr10msRdKbd		Timer10ms[20]

typedef struct {
	uint32_t TimerDelay;
	uint32_t TimerEspera;
}struct_TimerSysTick;

extern volatile struct_TimerSysTick TimerSysTick;

void timer_init(void);
void delay_ms(uint32_t ms);
void  timer_isr(void);

#endif
